In the Book Ender’s Game, later in the book we become more familiar with the enemy that Ender has to defeat. This enemy is known as the Formics, or more popularly known by their derogatory name The Buggers. These aliens have been in battle with the human race three times. The book takes place during the third war. At the end of the book Ender finds the hive queen who telepathically communicates with him, telling him that the Formics attacked the human race because they didn't detect a hive-mind state of thinking in the humans. This led the formics to believe that the humans were non-sentient and attacked them.

 This means that the Formics have a hive-mind. Hive mind is defined as:
"A type of collective consciousness where individuality is stifled; a state of conformity;" - dictionary.com
Another example of hivemind in science fiction are the Borg from Star Trek. Famous for the quote, “You will be assimilated, resistance is futile.”  The Borg is a cyborg race who believe that everyone should be assimilated and become part of the hivemind. Because of the fact that they all act under the same conscious it is like one thought that has multiple bodies. The Borg can assimilate other races, which means the Borg isn’t one race, but a collective of assimilated other races with the changes to make them part of the hivemind. 

Yet another alien race that acts similar to the hivemind, but differs slightly are the Cylons from Battlestar Galactica. The Cylons, short for Cybernetic Lifeform Node, are a robotic race that has multiple different beings. One kind of Cylon is the earlier model. This model looks like a robot, easy to identify. Another kind of Cylon, the later model, looks like a human. These types of Cylons are made through synthetic biology. Not only do they look like a human, but they are made from the same material, they have flesh and blood. The thing where the hivemind comes in is that Cylons of the same model are able to transfer data between their minds. It is stated that this is not a hive mind, but as a mode of communication.
The Cylons of Battlestar Galactica (above) and Locutus Borg from Star Trek (below)
A few other famously known examples of hiveminds in science fiction are the Bugs in Starship Troopers by Robert Heinlein, The Heart of Atlantis from the movie Atlantis: The Lost Empire, The Anti-Spirals from Gurren Lagann, The Xenomorph from Alien, and The Cybermen and the Daleks from Doctor Who. 
Picture
Xenomorph from Alien

Picture
Daleks from Doctor Who

The hivemind got its name from the insects that are Eusocial, which is the social system in insects that live under four basic characteristics. According to the Nature Education Knowledge Project these for characteristics are:
“adults live in groups, cooperative care of juveniles (individuals care for brood that is not their own), reproductive division of labor (not all individuals get to reproduce), and overlap of generations (Wilson 1971).” - Eusocial Insects
Bees are a prime example of this. Because they need to collect pollen to create honey there are certain things that need to be done. The pollen collecting bees bring back the pollen and give the nectar to the receiver bees who in turn take care of the food. They use this sort of hivemind thinking to know where to collect the pollen and nectar and to collaborate. This chart shows how the process is done within the group of bees. (1)
Much like in science fiction there are the workers who go out and do the work, and then there’s the one who directs the rest. The queen bee is much like the queen Formic from Ender’s Game.